﻿/*******************************************************************************
*  Project      : Minigate Golfin                                 
*  Program ID   : club_my.js                                 
*  Description  : 회원가입 
*
********************************************************************************
*  Program History                                                            
*  Date        Author    Description                                          
*  ----------  --------  -------------------------------------------------------- 
*  2012-05-04  이윤노    Created.
*  2012-05-04  이윤노    Complete.
*******************************************************************************/

jQuery(function($){
	
	//검색정렬
	function clsSearchSort(){
		this._HTMLDom = null;
		
		this._init();	
	}
	
	clsSearchSort.prototype = {
		_init: function(){
			var $layer = $("div#container section#main_content article.club_join_list table thead th");
			this._HTMLDom = {
				"$layer": $layer	
				, "$sorts": $layer.find("span")
			}
			
		}	
		, $getBtnSort: function(){
			var $layer = this._HTMLDom["$layer"];
			var $sorts = this._HTMLDom["$sorts"];
			
			return $sorts;
		}
		, setIdx: function(val){
			var $layer = this._HTMLDom["$layer"];
			
			if(val == $layer.data("idx"))  {
				$layer.data("sort", !$layer.data("sort"));
			}else {
				$layer.data("sort", true);
			}
			
			$layer.data("idx", val);
			
			this.display();
			return true;
		}
		, getSort: function(){
			return this._HTMLDom["$layer"].data("sort");
		}
		, display: function(){
			var $layer = this._HTMLDom["$layer"]; 
			var $sorts = this._HTMLDom["$sorts"];
			var idx = $layer.data("idx");
			
			$sorts.removeClass("th_t");
			
			// 현재 인덱싱된 타이틀만 on설정
			for(var i=0;i<$sorts.length;++i){
				if(idx==i) $sorts.eq(i).addClass("th_t");	
			}
			
		}
		
	}

//나의 가입동호회
	function clsClubMyList(){
		this._HTMLDom = null;
		this.clubList = null;
		this._init();	
	}
	
	clsClubMyList.prototype = {
		_init: function(){
			var $layer = $("div#container section#main_content article.club_join_list table tbody");
			this._HTMLDom = {
				"$layer": $layer
				, "$element": $layer.find("tr:first")
				, "$empty": $("body").find("article.board_list_none:eq(0)").html("가입된 동호회가 없습니다.")
			}
		}
		, setData: function(listData){
			this.clubList = listData;
			this.display();
		}		
		, display: function(){
			var thisClass = this;
			
			var $layer = this._HTMLDom["$layer"];
			var $element = this._HTMLDom["$element"];
			
			$layer.empty();
			
			this.isNoData();
			
			for(var i=0;i<this.clubList.length;++i){
				$layer.append($element.clone(true));
			}
						
			$layer.find("tr").each(function(n){
				$(this).find("td:eq(0)").html(thisClass.clubList[n]["카테고리"]);				
				$(this).find("td.align_l strong").css("cursor", "pointer").html(thisClass.clubList[n]["동호회명"]).click(function(event){
					document.location.href = "../self_club/home.html?club_seq=" + thisClass.clubList[n]["동호회키"];
					//-->
				});
				$(this).find("td:eq(2) strong").html(thisClass.getFormatNumber(thisClass.clubList[n]["회원수"]));
				$(this).find("td:eq(3)").html(thisClass.getFormatNumber(thisClass.clubList[n]["게시글"]));
				$(this).find("td:eq(4)").html(thisClass.getFormatDateYmd(thisClass.clubList[n]["회원정보"]["가입일"],"."));
			
				if(	thisClass.clubList[n]["회원정보"]["회원권한"] == "1" ) {
					$(this).find("td:eq(5)").html("<strong class='point_b'>" + thisClass.clubList[n]["회원정보"]["회원구분명"] + "</strong>")
					$(this).find("td:eq(6)").css("cursor", "pointer").html("관리하기").click(function(event){
						document.location.href = "../self_club/club_admin_info.html?club_seq=" + thisClass.clubList[n]["동호회키"];
						//-->
					});
				}else if(	thisClass.clubList[n]["회원정보"]["회원권한"] == "0" ) {
					$(this).find("td:eq(5)").html(thisClass.clubList[n]["회원정보"]["회원구분명"]);
					$(this).find("td:eq(6)").css("cursor", "pointer").html("탈퇴하기").click(function(event){
						if(confirm("[" + thisClass.clubList[n]["동호회명"] + "] 동호회를 탈퇴하시겠습니까?\n탈퇴 시 작성된 게시물은 자동 삭제되지 않습니다.")){
							$(thisClass).trigger("evtMyClubOut",[{"동호회키":thisClass.clubList[n]["동호회키"]}]);
						}
					});;
				}		
			});
		}
		, spinStart: function(){
			var $layer = this._HTMLDom["$layer"];
			$layer.hide();
			
			if($layer.parent().parent().prev("#tmpSpin").length == 0){
				$layer.parent().parent().before("<div id='tmpSpin' style='position:absolute; left:350px; top:120px;'></div>");
			}
			$layer.parent().parent().prev("#tmpSpin").spin();
						
		}
		, spinEnd: function(){
			var $layer = this._HTMLDom["$layer"];
			$layer.show();
			$layer.parent().parent().prev("#tmpSpin").spin(false);
			
		}
		, isNoData: function(cnt){
			var $layer = this._HTMLDom["$layer"];
			if(cnt > 0){
				$("article.board_list_none").eq(0).hide();
				$("#idClubMyListPage").show();
			}else{
				$("article.board_list_none").eq(0).show();
				$("#idClubMyListPage").hide();
			}
		}
		, getFormatDateYmd: function (n,v){			
			n = String(n);
			
			return n.substr(0,4) +v+ n.substr(4,2) +v+ n.substr(6,2);
		}
		, getFormatNumber: function(n){
			n = String(n);			
			i = n.length;
			r = "";
			while(true){				
				if(i<=3) {
					r = n.substr(0,i) + r;					
					break;
				}
				r = ","+ n.substr(i-3,3) + r;				
				i-=3;
			}
			return r;
		}
		, isNoData: function(){
			if(!this.clubList.length) {
				this._HTMLDom["$empty"].show();
				$("div#idClubMyListPage").hide();
			}else {
				this._HTMLDom["$empty"].hide();
				$("div#idClubMyListPage").show();
			}
		}
	}

	function clsClubNewList(){
		this._HTMLDom = null;
		this.clubNewList = null;
		
		this._init();	
	}	
	
	clsClubNewList.prototype = {
		_init: function(){
			var $layer = $("div#container section#main_content article.club_new>table>tbody");
			
			this._HTMLDom = {
				"$layer": $layer
				, "$element": $layer.find("tr:first")
				, "$sub_layer": $layer.find("td.open").parent()
				, "$sub_element": $layer.find("td.open tr:first")
				, "$empty": $("article.board_list_none").eq(1).html("등록된 글이 없습니다.")
			}
			
		}
		, setData: function(listData){
			this.clubNewList = listData;	
			this.display();
		}	
		, addProfile: function(n1,n2,oneData){			
			this.clubNewList[n1]["글목록"][n2]["프로필"] = oneData;
		}
		, display: function(){
			var thisClass = this;
			
			var $layer = this._HTMLDom["$layer"];
			var $element = this._HTMLDom["$element"];
			var $sub_layer = this._HTMLDom["$sub_layer"];
			var $sub_element = this._HTMLDom["$sub_element"];
	
			$layer.empty();
			
			this.isNoData(this.clubNewList.length);
			
			for(var i=0; i<this.clubNewList.length; ++i){
				$layer.append($element.clone(true));
			}
			
			$layer.find("tr").each(function(n){
				
				var obj = thisClass.clubNewList;
				
				$(this).find("td.name a").html(thisClass.clubNewList[n]["동호회명"]).click(function(event){
					thisClass.setIdx(n);
				});
				$(this).find("td p.new").html(thisClass.getFormatNumber(thisClass.clubNewList[n]["새글수"]));
				$(this).find("td p.rate").html(thisClass.getFormatNumber(thisClass.clubNewList[n]["회원수"]));
				$(this).find("td.align_c").html(thisClass.clubNewList[n]["등록시간"]);
				
				
				if(obj[n]){
					var $board = $(this).after($sub_layer.clone(true)).next();
					
					$board.find("tbody").empty();
										
					for(var i=0;i<obj[n]["글목록"].length;++i){
						$board.find("tbody").append($sub_element.clone(true));
					}
					
					if(obj[n]["글목록"].length){					
						$board.find("tr").each(function(v){
														
							$(this).find("td.align_l").css("cursor", "pointer").html(obj[n]["글목록"][v]["글제목"]).click(function(event){
								document.location.href =  "../self_club/home.html?club_seq=" + obj[n]["동호회키"] + "&board_seq=" + obj[n]["글목록"][v]["게시판키"];
								//-->
							});
							
							if(obj[n]["글목록"][v]["댓글수"]) $(this).find("td.align_l").append("<em>(" + obj[n]["글목록"][v]["댓글수"] + ")</em>");
							
							$(this).find("td.point_b").html(obj[n]["글목록"][v]["닉네임"]).hover(function(event){
								_gf.showProfileLayer($(this), obj[n]["글목록"][v]["프로필"], "left", 0, $(this).height());
							}, function(event){
								_gf.objProfileLayer.hide();
							});							;
							$(this).find("td:last").html(obj[n]["글목록"][v]["등록시간"]);
							
						});
					}
				}
			
				
			});
			
			$layer.find("td.open").not(":first").hide();
			$layer.find("tr:first").removeClass("down").addClass("up");
						
		}
		, spinStart: function(){
			var $layer = this._HTMLDom["$layer"];
			$layer.hide();
			
			if($layer.parent().parent().prev("#tmpSpin").length == 0){
				$layer.parent().parent().before("<div id='tmpSpin' style='position:absolute; left:350px; top:600px;'></div>");
			}
			$layer.parent().parent().prev("#tmpSpin").spin();
						
		}
		, spinEnd: function(){
			var $layer = this._HTMLDom["$layer"];
			$layer.show();
			$layer.parent().parent().prev("#tmpSpin").spin(false);
			
		}
		, setIdx: function(val){
			var $layer = this._HTMLDom["$layer"];
						
			$layer.find(".up,.down").removeClass("up").removeClass("down").addClass("down").eq(val).removeClass("down").addClass("up");
			
			$layer.find(".open").hide().eq(val).show();
		}
		, isNoData: function(cnt){
			var $layer = this._HTMLDom["$layer"];
			if(cnt > 0){
				this._HTMLDom["$empty"].hide();
				$("#idClubNewListPage").show();
			}else{
				this._HTMLDom["$empty"].show();
				$("#idClubNewListPage").hide();
			}
		}
		, getFormatNumber: function(n){
			n = String(n);			
			i = n.length;
			r = "";
			while(true){				
				if(i<=3) {
					r = n.substr(0,i) + r;					
					break;
				}
				r = ","+ n.substr(i-3,3) + r;				
				i-=3;
			}
			return r;
		}
	}
		
	// 서버통신
	function clsComm()
	{
		//초기화
		this.clubMyList = null;
		this.clubMyListPageData = null;
		this.clubMyListRequest = null;
				
		this.clubNewList = null;
		this.clubNewListPageData = null;
		this.clubNewListRequest = null;
		
		this.clubOutRequest = null
		
		this._init();
	}
	
	clsComm.prototype = {
		_init: function(){
//------------------------ 가입동호회------------------------//					
			this.clubMyList = [
					{
						"동호회키": "1"
						, "카테고리": "지역"
						, "동호회명": "♥가장 편안한 [골프 커뮤니티] 왕골스토리♥ 대표"
						, "회원수": "123명"
						, "게시글": "345"
						, "회원정보": {
									"회원구분명": "일반회원"
									, "회원권한": "0"
									, "가입일": "2012.05.23"
						}
					 }
					,{
						"동호회키": "2"
						, "카테고리": "지역"
						, "동호회명": "골프원"
						, "회원수": "123명"
						, "게시글": "345"
						, "회원정보": {
									"회원구분명": "개설자"
									, "회원권한": "1"
									, "가입일": "2012.05.23"
						}
					 }
				];
			
			this.clubMyListPageData = {
				"전체수": null
			}
			
			this.clubMyListRequest = {
				"페이지": null
				, "정렬키": null
				, "정렬방향": null
			}	
//------------------------ 가입동호회------------------------//						
//------------------------ 동호회새글------------------------//						
			this.clubNewList = [
					{
						"동호회키": "1"
						, "동호회명": "타이틀리스트에 미치다! (Mad for Titleist!)"
						, "글목록": [{
											"글제목" : "코스 해석좀 부탁드려요"	
											, "댓글수": "0"
											, "닉네임": "팡야"
											, "등록시간": "18초전"
										}
										, {
											"글제목" : "제 자세가 어디가 문제일까요?"	
											, "댓글수": "0"
											, "닉네임": "잭니클라우스"
											, "등록시간": "18초전"
										}
										, {
											"글제목" : "서울근교 골프장 추천해주세요."	
											, "댓글수": "10"
											, "닉네임": "타이거우즈"
											, "등록시간": "18초전"
										}]
						, "새글수" : "12"
						, "회원수": "3000"
						, "등록시간" : "10분전"	
					}
					,{
						"동호회키": "1"
						, "동호회명": "골프할인 골프몬"
						, "글목록": ""
						, "새글수" : "12"
						, "회원수": "3100"
						, "등록시간" : "10분전"	
					}
			];
			
			this.clubNewListRequest = {
				"페이지": null
			}	
//------------------------ 동호회새글------------------------//		
//------------------------ 동호회탈퇴------------------------//	
			this.clubOutRequest = {
				"동호회키": null					
			}
//------------------------ 동호회탈퇴------------------------//				
		}	
	
//------------------------ 가입동호회------------------------//		
		, getClubMyList: function(){
			var thisClass = this;
			
			var szPage = this.getClubMyListRequest("페이지");
			var szSortKey = this.getClubMyListRequest("정렬키");
			var szSortOption = this.getClubMyListRequest("정렬방향");
			
			// ajax 시작			
			//parameter setting and run
			_gf.ajax({
				"sid":"CL001",
				"servicename":"getMyClubList",
				"listcount":10,
				"currpageno":szPage
			}, {
				  "sortBy": szSortKey
				  , "sortOption": szSortOption
			}, function(ret){
				
				thisClass.clubMyListPageData = {
					"전체수": ret["msp"]["contents"]["@totalcount"]
				}
				
				// callback and mapping
				thisClass.clubMyList = [];
			
				if(ret["msp"]["contents"]["items"]){
					
					if(!ret["msp"]["contents"]["items"].length){
						ret["msp"]["contents"]["items"] = new Array(ret["msp"]["contents"]["items"]);
					}
					
					for(var i=0;i<ret["msp"]["contents"]["items"].length;i++){
						var arr = [];
						var obj = ret["msp"]["contents"]["items"][i];
						
						//동호회목록
						thisClass.clubMyList.push({
							"동호회키": obj["clubSeq"]
							, "동호회명": obj["clubName"]
							, "회원수": obj["memberCnt"] 
							, "게시글": obj["newBoardCnt"]
							, "회원정보": {
								"회원구분명": obj["clubMember"]["memberRoleName"]
								, "회원권한": obj["clubMember"]["adminFlag"]
								, "가입일": obj["clubMember"]["joinDate"]
							}
						});
						
					}         
				}
				
				$(thisClass).trigger("evtFinishClubMyList");
			});
			// ajax 끝
			
		}
		, getClubMyListData: function(){
			return this.clubMyList;	
		}		
		, setClubMyListRequest: function(key, val){
			this.clubMyListRequest[key] = val;	
		}
		, getClubMyListRequest: function(key){
			return this.clubMyListRequest[key];	
		}
		, getClubMyListPageData: function(){
			return this.clubMyListPageData;	
		}
//------------------------ 가입동호회------------------------//			
//------------------------ 동호회새글------------------------//			
		//동호회새글
		, getClubNewList: function(){
			var thisClass = this;
			
			var szPage = this.getClubNewListRequest("페이지");
			
			// ajax 시작			
			//parameter setting and run
			_gf.ajax({
				"sid":"CL001",
				"servicename":"getMyClubBoardList",
				"listcount":5,
				"currpageno":szPage
			}, {
				  
			}, function(ret){
				
				thisClass.clubNewListPageData = {
					"전체수": ret["msp"]["contents"]["@totalcount"]
				}
				
				// callback and mapping
				thisClass.clubNewList = [];
			
			
				if(ret["msp"]["contents"]["items"]){
					
					if(!ret["msp"]["contents"]["items"].length){
						ret["msp"]["contents"]["items"] = new Array(ret["msp"]["contents"]["items"]);
					}
					
					for(var i=0;i<ret["msp"]["contents"]["items"].length;i++){
						var arr = [];
						var obj = ret["msp"]["contents"]["items"][i];
						
						//글목록
						if(!obj["clubBoardList"][0]["items"].length){
							obj["clubBoardList"][0]["items"] = new Array(obj["clubBoardList"][0]["items"]);
						}
						
						for(var k=0;k<obj["clubBoardList"][0]["items"].length;++k){							
							var objList = obj["clubBoardList"][0]["items"][k];
							
							arr.push( {
									"게시판키":objList["board__seq"]
									, "글제목":  objList["title"]
									, "댓글수": objList["cr__cnt"]
									, "아이디": objList["reg__id"]
									, "닉네임": objList["reg__nickname"]
									, "등록시간": objList["timelag"]	
									, "프로필": []
							});								
						}
						
						//동호회목록
						thisClass.clubNewList.push({
							"동호회키": obj["clubSeq"]
							, "동호회명": obj["clubName"]
					
							, "글목록": arr
					
							, "새글수": obj["newBoardCnt"]
							, "회원수": obj["memberCnt"]
							, "등록시간": obj["timelag"]
						});
						
					}                                          
				}             
				
				$(thisClass).trigger("evtFinishClubNewList");
			});
			// ajax 끝
			                                                                                                     
		}
		, getClubNewListData: function(){
			return this.clubNewList;
		}
		, setClubNewListRequest: function(key, val){
			this.clubNewListRequest[key] = val;	
		}
		, getClubNewListRequest: function(key){
			return this.clubNewListRequest[key];	
		}
		, getClubNewListPageData: function(){
			return this.clubNewListPageData;	
		}
//------------------------ 동호회새글------------------------//					
//------------------------ 동호회탈퇴------------------------//	
		, clubOutSubmit: function(arg){
			var thisClass = this;
			var szClubSeq = arg["동호회키"]
			
			// ajax 시작			
			//parameter setting and run
			_gf.ajax({
				"sid":"CL001",
				"servicename":"withdrawClub"
			}, {
				  "clubSeq": szClubSeq
				  , "userId": null
			}, function(ret){
				// callback and mapping
				var resData = {
					"응답코드": (ret["msp"]["contents"]["serviceResult"] == "00000"?true:false)
					, "메세지":  _gf.getResultMsg(ret,[""])
				}
				
				$(thisClass).trigger("evtFinishClubOut",[resData]);
			});
			// ajax 끝
			
		}
//------------------------ 동호회탈퇴------------------------//			
	}
		
	// 초기화면 제어
	function clsControl()
	{
		//초기화
		this.objComm = null;
		
		this.objSearchSort = null;
		 
		this.objClubMyList = null;
		this.objClubMyListPage = null;
		
		this.objClubNewList = null;
		this.objClubNewListPage = null;

		this._init();
		
	}

	clsControl.prototype = {
				
		//초기화
		_init: function(){
			this.objComm = new clsComm();
			
			this.objSearchSort = new clsSearchSort();
			
			this.objClubMyList = new clsClubMyList();
			this.objClubMyListPage = new _gf.makePaging($("#idClubMyListPage"), 10, 10);
			
			this.objClubNewList = new clsClubNewList();
			this.objClubNewListPage = new _gf.makeTinyPaging($("#idClubNewListPage"), 5)
			
			this._bind();			
			
			//검색정렬
			this.objSearchSort.setIdx(0);
			
			//나의 가입동호회 조회
			this.objClubMyList.spinStart();
			this.objComm.setClubMyListRequest("정렬키","0");
			this.objComm.setClubMyListRequest("정렬방향",true)
			this.objComm.setClubMyListRequest("페이지",1);
			this.objClubMyListPage.setPage(1);
			this.objComm.getClubMyList();
			
			//동호회 새글 조회
			this.objClubNewList.spinStart();
			this.objComm.setClubNewListRequest("페이지",1);
			this.objClubNewListPage.setPage(1);
			this.objComm.getClubNewList();
			
		}
		
		//데이터 화면처리
		, _bind: function(){
			var thisClass = this;
			
			//전체동호회 버튼 이벤트
			$("div#container section#main_content article.depth2_tab ul li a img[alt=전체동호회]").click(function(event){
				event.preventDefault();					
				document.location.href = "../club/club.html";
			});
			
			//나의동호회 버튼 이벤트
			$("div#container section#main_content article.depth2_tab ul li a img[alt=나의동호회]").click(function(event){
				event.preventDefault();					
				document.location.href = "../club/club_join.html";
			});
			
			//나의동호회알림 버튼 이벤트
			$("div#container section#main_content article.club_myclub ul li a:eq(1)").click(function(event){
				event.preventDefault();					
				document.location.href = "../club/club_my.html";
			});
			
			//나의동호회알림 버튼 이벤트
			$("div#container section#main_content article.club_myclub ul li a:eq(0)").click(function(event){
				event.preventDefault();					
				document.location.href = "../club/club_join.html";
			});
			
			//동호회개설 버튼 이벤트
			$(".btn_depth a img").click(function(event){
					event.preventDefault();					
					document.location.href = "../club/club_creat.html";
			});
			
			//가입동호회 조회 완료 이벤트
			$(this.objComm).bind("evtFinishClubMyList", function(){
				var thisData = this.getClubMyListData();
				var pageData = thisClass.objComm.getClubMyListPageData();
				
				thisClass.objClubMyList.spinEnd();
				thisClass.objClubMyList.setData(thisData);
				
				//페이징
				thisClass.objClubMyListPage.setTotalCount(pageData["전체수"]);
				thisClass.objClubMyListPage.display()
			});
			
			//동호회새글 조회 완료 이벤트
			$(this.objComm).bind("evtFinishClubNewList", function(){
				var thisData = this.getClubNewListData();
				var pageData = thisClass.objComm.getClubNewListPageData();
				
				thisClass.objClubNewList.spinEnd();
				thisClass.objClubNewList.setData(thisData);
				
				//페이징
				thisClass.objClubNewListPage.setTotalCount(pageData["전체수"]);
				thisClass.objClubNewListPage.display();
				
				for(var i=0;i<thisData.length;++i){					
					for(var k=0;k<thisData[i]["글목록"].length;++k){
						//프로필
						_gf.getMemberInfo({
							"아이디": thisData[i]["글목록"][k]["아이디"]
							, "인덱스": i
							, "글인덱스": k
							, "콜백": function(res, info, arg){
								thisClass.objClubNewList.addProfile(arg["인덱스"],arg["글인덱스"], info);
							}
						});
					}
				}
				
			});
			
			//동호회탈퇴 완료이벤트
			$(this.objComm).bind("evtFinishClubOut", function(event, resData){				
				alert(resData["메세지"]);								
				if(resData["응답코드"]){
					thisClass.objClubMyList.spinStart();
					thisClass.objComm.setClubMyListRequest("정렬키","0");
					thisClass.objComm.setClubMyListRequest("정렬방향",true)
					thisClass.objComm.setClubMyListRequest("페이지",1);
					thisClass.objClubMyListPage.setPage(1);
					thisClass.objComm.getClubMyList();
				}	
			});
			
			//가입동호회 페이지이동 이벤트
			$(this.objClubMyListPage).bind("evtPageClick", function(){
				var thisPage = this.getPage();
				
				thisClass.objComm.setClubMyListRequest("페이지", thisPage);
				thisClass.objClubMyList.spinStart();
				thisClass.objComm.getClubMyList();
			});
			
			//가입동호회 정렬버튼 이벤트
			this.objSearchSort.$getBtnSort().click(function(event){
				var idx = thisClass.objSearchSort.$getBtnSort().index($(this));
				var sorts = thisClass.objSearchSort.getSort();
								
				thisClass.objSearchSort.setIdx(idx);
				
				thisClass.objComm.setClubMyListRequest("페이지", 1);
								
				thisClass.objComm.setClubMyListRequest("정렬키", idx);
				thisClass.objComm.setClubMyListRequest("정렬방향", (sorts?"2":"1"));
				
				thisClass.objClubMyListPage.setPage(1);
				thisClass.objClubMyList.spinStart();
				thisClass.objComm.getClubMyList()
			
			});
			
			//동호회새글 페이지이동 이벤트
			$(this.objClubNewListPage).bind("evtPageClick", function(){
				var thisPage = this.getPage();
				
				thisClass.objComm.setClubNewListRequest("페이지", thisPage);
				thisClass.objClubNewList.spinStart();
				thisClass.objComm.getClubNewList();
				
			});
			
			//동호회탈퇴하기 이벤트
			$(this.objClubMyList).bind("evtMyClubOut", function(event, submitData){ 
				thisClass.objComm.clubOutSubmit(submitData);				
			});
			
		}
					
	}

	document.objControl = new clsControl();	
});